﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Chbl.ViewModels;

namespace Chbl.Controllers
{
    public class QualificationController : Controller
    {
        public ActionResult Index()
        {
            return View(LoadQualifyingGames());
        }

        private static IEnumerable<QualifyingGamesViewModel> LoadQualifyingGames()
        {
           return new QualifyingGamesViewModel[]
                                  {
                                      new QualifyingGamesViewModel{
                                      RoundName = "1-й игровой день 22 октября",
                                      QualifyingGames = new[]
                                                            {
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Нехао",
                                                                        GameTime = "11:00",
                                                                        AwayTeam = "Авангард-Баскет"
                                                                        
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Соломенка",
                                                                    GameTime = "11:30",
                                                                    AwayTeam = "Нью Лайф"
                                                                },
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Штопкэ-Баскет",
                                                                        GameTime = "13:00",
                                                                        AwayTeam = "Баски"
                                                                        
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Капитал",
                                                                    GameTime = "13:30",
                                                                    AwayTeam = "Мицу-Клуб"
                                                                },
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "БК «Гарлес»",
                                                                        GameTime = "15:00",
                                                                        AwayTeam = "Скорпионы"
                                                                        
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Оболонь",
                                                                    GameTime = "15:30",
                                                                    AwayTeam = "Бульдоги III"
                                                                },
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Атон",
                                                                        GameTime = "17:00",
                                                                        AwayTeam = "КНУАГИ"                                                              
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "НУБіП - Баскет",
                                                                    GameTime = "17:30",
                                                                    AwayTeam = "ПСТ"
                                                                }

                                                            },
                                      TableColumnNames = new[] {"Хозяева", "Время Игры", "Гости"}
                                      },
                                      new QualifyingGamesViewModel{
                                      RoundName = "2-й игровой день 29 октября",
                                      QualifyingGames = new[]
                                                            {
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Нью Лайф",
                                                                        GameTime = "11:00",
                                                                        AwayTeam = "Мицу-Клуб"
                                                                        
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Гарлес",
                                                                    GameTime = "11:30",
                                                                    AwayTeam = "КНУАГИ"
                                                                },
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Авангард-Баскет",
                                                                        GameTime = "13:15",
                                                                        AwayTeam = "Баски"
                                                                        
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Оболонь",
                                                                    GameTime = "13:45",
                                                                    AwayTeam = "НУБиП-Баскет"
                                                                },
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Нехао",
                                                                        GameTime = "15:30",
                                                                        AwayTeam = "Кэпитэл"
                                                                        
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Бульдоги III",
                                                                    GameTime = "16:00",
                                                                    AwayTeam = "Атон"
                                                                },
                                                                new QualifyingGame
                                                                    {
                                                                        HomeTeam = "Соломенка",
                                                                        GameTime = "17:45",
                                                                        AwayTeam = "Штопке-Баскет"                                                              
                                                                    },
                                                                new QualifyingGame
                                                                {
                                                                    HomeTeam = "Скорпионы",
                                                                    GameTime = "18:15",
                                                                    AwayTeam = "ПСТ"
                                                                }

                                                            },
                                      TableColumnNames = new[] {"Хозяева", "Время Игры", "Гости"}
                                      }
                                  };
        }
    }
}
